﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true" CodeBehind="CadastrarCategoria.aspx.cs" Inherits="TrabalhoLAP.Views.Cadastro.Categoria.CadastrarCategoria" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Panel ID="pnlCadastro" runat="server" Height="384px" GroupingText="Cadastro">
        <table>
            <tr>
                <td>
                    <asp:Label ID="lblDrcCategoria" Text="Descrição Categoria: " runat="server" />
                </td>
                <td>
                    <asp:TextBox ID="txbDrcCategoria" runat="server" Width="200px"></asp:TextBox>
                </td>
                <td>
                    <asp:Label ID="lblVlrCategoria" runat="server" Text="Valor Categoria:" />
                </td>
                <td>
                    <asp:TextBox ID="txbVlrCategoria" runat="server" Width="200px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblStatusRegistro" runat="server" Text="Status Registro: " />
                </td>
                <td>
                    <asp:CheckBox ID="ckbStatusRegistro" runat="server" />
                </td>
            </tr>
            <tr>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td>
                    <asp:Button ID="btnCadastrarItem" Text="Cadastrar" runat="server" OnClick="btnCadastrarItem_Click" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblItem" runat="server" Text="Item:" />
                </td>
                <td>
                    <asp:DropDownList ID="ddlItem" runat="server" DataSourceID="SqlItensAtivos" DataTextField="drcItem" DataValueField="codItem">
                    </asp:DropDownList>
                    <asp:SqlDataSource ID="SqlItensAtivos" runat="server" ConnectionString="<%$ ConnectionStrings:trabalholapConnectionString %>" ProviderName="<%$ ConnectionStrings:trabalholapConnectionString.ProviderName %>" SelectCommand="SELECT codItem, drcItem FROM item ORDER BY drcItem"></asp:SqlDataSource>
                </td>
                <td>
                    <asp:Button ID="btnAdicionarItem0" runat="server" OnClick="btnAdicionarItem_Click" Text="Adicionar Item" />
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            
        </table>

        <br />


        <asp:Panel ID="pnlResultado" runat="server" Height="191px" GroupingText="Itens" Style="margin-bottom: 12px">

            <asp:GridView ID="gdwSalvar" runat="server" AutoGenerateColumns="false" CellPadding="3" ForeColor="Black" GridLines="Vertical"
                BackColor="White" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" Width="881px" Style="text-align: center" OnRowDeleting="gdwSalvar_RowDeleting">

                <AlternatingRowStyle BackColor="#CCCCCC" />
                <FooterStyle BackColor="#CCCCCC" />
                <HeaderStyle Font-Bold="True" ForeColor="Black" BackColor="#CAC9C9" />
                <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="Black" />
                <SortedAscendingCellStyle BackColor="#F1F1F1" />
                <SortedAscendingHeaderStyle BackColor="#808080" />
                <SortedDescendingCellStyle BackColor="#CAC9C9" />
                <SortedDescendingHeaderStyle BackColor="#383838" />

                <Columns>

                    <asp:TemplateField HeaderText="Código Item">
                        <ItemTemplate>
                            <asp:Label ID="gdvLblCodItem" runat="server" Text='<%#Bind("codItem") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>

                    <asp:TemplateField HeaderText="Descrição Item">
                        <ItemTemplate>
                            <asp:Label ID="gdvLblDrcItem" runat="server" Text='<%#Bind("DrcItem") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>

                    <asp:TemplateField HeaderText="">
                        <ItemTemplate>
                            <asp:Button ID="btnExcluir" runat="server" Text="Excluir" CommandName="Delete" />
                        </ItemTemplate>
                    </asp:TemplateField>

                </Columns>

            </asp:GridView>
        </asp:Panel>
    </asp:Panel>
</asp:Content>
